﻿<UserControl x:Class="WetHatLab.OneNote.TaggingKit.find.TagSelector"
             Name="self"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:WetHatLab.OneNote.TaggingKit.find"
             xmlns:prop="clr-namespace:WetHatLab.OneNote.TaggingKit.Properties"
             Visibility="{Binding Visibility, Mode=OneWay}"
             ToolTip="{Binding Mode=OneTime, Source={x:Static prop:Resources.TagSelector_Tooltip}}"
             mc:Ignorable="d" DataContextChanged="OnDatacontextChanged">
    <ToggleButton Name="tagBtn"
                  Background="White"
                  IsChecked="{Binding IsChecked}"
                  Focusable="{Binding ElementName=self,Path=Focusable, Mode=OneWay}"
                  BorderBrush="LightBlue">
        <StackPanel Orientation="Horizontal">
            <TextBlock Name="tagName" VerticalAlignment="Bottom" Focusable="False"/>
            <TextBlock VerticalAlignment="Bottom" Focusable="False">
                <Run Text=" ("/><Run Text="{Binding PageCount,Mode=OneWay}"/><Run Text=")"/>
            </TextBlock>
            <CheckBox VerticalAlignment="Bottom"
                      Focusable="False"
                      IsChecked="{Binding ElementName=tagBtn, Path=IsChecked, Mode=OneWay}"
                      BorderThickness="0" Background="Transparent"/>
        </StackPanel>
    </ToggleButton>
</UserControl>
